<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">

<head th:replace="header :: common_header(~{::title},~{::link})">
<title>秒到2.0综合管理后台-添加公告</title>
<link th:href="@{/assets/global/plugins/umeditor/umeditor.min.css}"
	rel="stylesheet" type="text/css" />
</head>

<body
	class="page-header-fixed page-sidebar-closed-hide-logo page-content-white">
	<div class="page-wrapper">
		<div class="page-header navbar navbar-fixed-top"
			th:insert="~{index :: navbar-top}"></div>
		<div class="clearfix"></div>
		<div class="page-container">
			<div class="page-sidebar-wrapper" th:insert="~{index :: sidebar}">
			</div>
			<div class="page-content-wrapper">
				<div class="page-content">
					<form class="form-horizontal" role="form"
						action="/p/note/reader/addReader" id="modal_new_role" method="post">
						<div class="form-group">
							<div class="col-md-5">
								<span class="help-block text-center"></span> <input
									type="hidden" name="id">
							</div>
						</div>
						<div class="form-group">
							<label for="firstname" class="col-sm-2 control-label"><span
								class="required"> * </span>公告标题</label>
							<div class="col-sm-6">
								<input type="text" class="form-control" name="title"
									placeholder="公告标题" maxlength="30">
							</div>
						</div>
						<div class="form-group">
							<label for="firstname" class="col-sm-2 control-label"><span
								class="required"> * </span>公告标签</label>
							<div class="col-sm-2">
								<input type="radio" name="label" value="政策/行政文件">政策/行政文件
							</div>
							<div class="col-sm-2">
								<input type="radio" name="label" value="系统升级/功能更新">系统升级/功能更新
							</div>
						</div>
						<div class="form-group">
							<label for="firstname" class="col-sm-2 control-label"><span
								class="required"> * </span>公告对象</label>
							<div class="col-sm-2">
								<input type="radio" name="target" value="商户">商户
							</div>
							<div class="col-sm-2" th:if="${agent?.type!='普通'}">
								<input type="radio" name="target" value="代理商">代理商
							</div>
						</div>
						<div class="form-group">
							<label for="firstname" class="col-sm-2 control-label"><span
								class="required"> * </span>模板</label>
								<!-- th:if="${not #lists.isEmpty(tmpList)}"
								th:each="tmp:${tmpList}" -->
							<div class="col-sm-2" >
							<!-- 	<input type="checkbox" th:value="${tmp.template}"
									th:text="${tmp.template=='零售电商'?'云商(秒到2.0)':'来店美业(秒到2.0)'}" name="templates"> -->
										<input  name="templates" type="radio" value="零售电商"/>云商(秒到2.0)
									<!-- <input type="checkbox" th:value="零售电商" 	th:text="云商(秒到2.0)" name="templates">
									<input type="checkbox" th:value="技师服务"  	th:text="来店美业(秒到2.0)" name="templates"> -->
							</div>
							<div class="col-sm-2" >
							   <input  name="templates" type="radio" value="技师服务">秒到来店
							</div>

						</div>
						
							<!-- <div class="form-group">
							<label for="firstname" class="col-sm-2 control-label"><span
								class="required"> * </span>公告内容</label>
								<textarea style="width: 650px; height: 350px;" name="content" maxlength="500"></textarea>
						    </div> -->
						    <div class="form-group">
							<lable class="col-md-2 control-label"> <span
								class="required"> * </span>公告内容</lable>
							<div class="col-md-8">
								<!-- 加载编辑器的容器 -->
								<script id="container" name="content" type="text/plain"
									style="width: 650px; height: 300px;">
													</script>
								<div><span class="required"  style="color: #666" id="gg">*公告字数:字数应控制在10000字以内</span></div>
								<div id="pro_txt" class="hidden"><!-- [[${content}]] --></div>
								<div id="btn-uploader1">
									<a id="pickfiles1" href="javascript:void 0;"></a>
								</div>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-offset-2 col-sm-10">
								<button type="button" class="btn btn-info" id="save">发布</button>
								<button type="button" class="btn " onclick="beback();">返回</button>
							</div>
						</div>
					</form>
				</div>
				<div class="page-footer">
					<div class="page-footer-inner">
						2017 &copy; 秒迅科技</a>
					</div>
					<div class="scroll-to-top">
						<i class="icon-arrow-up"></i>
					</div>
				</div>
			</div>
			<!-- 业务js -->
			<script th:src="@{/assets/pages/scripts/note.js}"
				type="text/javascript"></script>

			<!-- 配置文件 -->
			<script type="text/javascript"
				th:src="@{/assets/global/plugins/umeditor/template.min.js}"></script>
			<script type="text/javascript"
				th:src="@{/assets/global/plugins/umeditor/umeditor.config.js}"></script>
			<!-- 编辑器源码文件 -->
			<script type="text/javascript"
				th:src="@{/assets/global/plugins/umeditor/umeditor.min.js}"></script>
			<!-- 实例化编辑器 -->

			<!-- 实例化编辑器 -->
			<script type="text/javascript">
      window.UMEDITOR_CONFIG.toolbar = [
            // 加入一个 test
            '  source | fontfamily fontsize | bold italic underline strikethrough  forecolor | insertorderedlist insertunorderedlist'
        ];
       var um = UM.getEditor('container');
      $(document).ready(function () {
      var pro_value=$("#pro_txt").text();  
          um.ready(function() {//编辑器初始化完成再赋值  
              um.setContent(pro_value);  //赋值给UEditor  
          });
      });
    </script>

</body>
</html>